﻿using System;

namespace School.Model
{
    using EDP.Common;
    using EDP.Common.Model;

    /// <summary>
    /// 学生信息查询对象
    /// </summary>
    [QueryModel] //标记类的查询对象特性
    public class StudentQueryModel : QueryModelBase //继承QueryModelBase
    {
        /// <summary>
        /// 姓名
        /// </summary>
        [QueryModel(Operator = QueryOperator.like, ColumnName = "Name")]
        public string Name { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [QueryModel(Operator = QueryOperator.eq, ColumnName = "GenderId")]
        public int? GenderId { get; set; }

        /// <summary>
        /// 校区
        /// </summary>
        [QueryModel(Operator = QueryOperator.eq, ColumnName = "CampusId")]
        public string CampusId { get; set; }

        /// <summary>
        /// 班级
        /// </summary>
        [QueryModel(Operator = QueryOperator.eq, ColumnName = "ClassId")]
        public string ClassId { get; set; }

        /// <summary>
        /// 班级全编码
        /// </summary>
        /// <example>ClassFullCode like '值%'</example>
        [QueryModel(Operator = QueryOperator.likeRight, ColumnName = "ClassFullCode")]
        public string ClassFullCode { get; set; }

        /// <summary>
        /// 编号姓名关键字
        /// Number和Name都进行like查询
        /// </summary>
        /// <example>Number like '%关键字%' or Name like '%值%'</example>
        [QueryModel(Operator = QueryOperator.like, ColumnNameList = "Number;Name")]
        public string NumberNameKeywrod { get; set; }

        /// <summary>
        /// 分页对象
        /// </summary>
        public PageModel Page { get; set; } = new PageModel();
    }
}
